import request from '@/utils/request.js'

// 获取促销活动数据
export const apiActivityList = params => request.get('tienchin/activity/list', {params})

// 获取渠道数据
export const apiChannelList = () => request.get('tienchin/activity/channel/list')

// 导出
export const apiDeriveXlsx = params => request.post('tienchin/activity/export', params, {responseType: 'blob'})

// 删除数据
export const apiDelList = ids => request.delete(`tienchin/activity/${ids}`)

// 添加数据
export const apiAddList = params => request.post('tienchin/activity', params)

// 获取想要修改的数据
export const apiGetEditList = id => request.get(`tienchin/activity/${id}`)

// 确认修改数据
export const apiEditList = params => request.put('tienchin/activity', params)
